<?
// archivos necesarios
require_once 'admin/config.php';
require_once 'admin/conexion.php';

function bbcsmilies($variable){

$dbConn = conectar();
$buscando = "SELECT * FROM `configuracion`";
$resultando = mysql_query ($buscando, $dbConn);
while ($rows = mysql_fetch_assoc ($resultando)) {
$estilo = $rows['estilo'];
}

$variable = str_replace(":)","<img src=\"estilos/$estilo/smilies/001_smile.gif\">","$variable");

$variable = str_replace(":D","<img src=\"estilos/$estilo/smilies/001_tongue.gif\">","$variable");

$variable = str_replace(":P","<img src=\"estilos/$estilo/smilies/001_cool.gif\">","$variable");

$variable = str_replace(":lloro:","<img src=\"estilos/$estilo/smilies/crying.gif\">","$variable");

$variable = str_replace(":amo:","<img src=\"estilos/$estilo/smilies/001_tt1.gif\">","$variable");

$variable = str_replace(":odio:","<img src=\"estilos/$estilo/smilies/angry.gif\">","$variable");

$variable = str_replace(":lol:","<img src=\"estilos/$estilo/smilies/lol.gif\">","$variable");

$variable = str_replace("[b]","<b>",$variable);
$variable = str_replace("[/b]","</b>",$variable);
$variable = str_replace("[i]","<i>",$variable);
$variable = str_replace("[/i]","</i>",$variable);
$variable = str_replace("[s]","<u>",$variable);
$variable = str_replace("[/s]","</u>",$variable);
return $variable;
}
?>